package ar.com.quickMart.logic;

import java.io.Serializable;

import ar.com.quickMart.database.quickMartDB;

public class EmployeeType implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1175157238356554495L;
	
	private long id;
	private String description;
	
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
		
	}
	
	//TODO: todo lo demas
	public static EmployeeType getCashierType(){
		EmployeeType emp = new EmployeeType();
		
		emp.setId(quickMartDB.getEmployeeDao().getEmployeeTypeId("Cajero"));
		emp.setDescription("Cajero");
		return emp;
	}
	public static EmployeeType getWareHouseManagerType(){
		EmployeeType emp = new EmployeeType();
		
		emp.setId(quickMartDB.getEmployeeDao().getEmployeeTypeId("Encargado de deposito"));
		emp.setDescription("Encargado de deposito");
		return emp;
	}
	public static EmployeeType getAdministratorType(){
		EmployeeType emp = new EmployeeType();
		
		emp.setId(quickMartDB.getEmployeeDao().getEmployeeTypeId("Administrador"));
		emp.setDescription("Administrador");
		return emp;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (id ^ (id >>> 32));
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		EmployeeType other = (EmployeeType) obj;
		if (id != other.id) {
			return false;
		}
		return true;
	}
	
	

}
